package com.gdth.bank.widget;

import java.util.List;

import com.gdth.bank.R;
import com.gdth.model.Item;
import com.gdth.widget.dwonloadlist.DrawDownListEditText;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

public class BankDrawDownListEditText extends DrawDownListEditText{
	public ImageView oneImageView;
	
	public BankDrawDownListEditText(Context context) {
		super(context, R.layout.widget_drawdownlist_lxfs);
	}
	
	public BankDrawDownListEditText(Context context, AttributeSet attrs) {
		super(context, attrs, R.layout.widget_drawdownlist_lxfs);
	}
	
	@Override
	public void initView(){
        txt_label = (TextView) findViewById(R.id.drawablelist_label);
        txt_value = (EditText) findViewById(R.id.drawdownlist_edit_phone);
        oneImageView = (ImageView) findViewById(R.id.drawdownlist_one);
        img_select = (ImageView) findViewById(R.id.drawdownlist_two);
        
        this.setTheme(R.drawable.background_corner_list);
	}
	
    /**
     * 获取通讯录事件
     * @param telephoneListener
     */
    public void setPhoneClickListener(OnClickListener telephoneListener){
    	img_select.setOnClickListener(telephoneListener);
    }
    
    public void setCallClickListener(OnClickListener telephoneListener){
        oneImageView.setOnClickListener(telephoneListener);
    }
    
    public void setImageForOne(Drawable drawable){
    	oneImageView.setImageDrawable(drawable);
    }
    public void setImageForTwo(Drawable drawable){
    	img_select.setImageDrawable(drawable);
    }
    
	public void setItem(List<Item> items){
		this.items = items;
	}
}
